package com.xmall.define.dict;

/**
 * 日志状态（0未处理  1已处理）
 */
public enum LogStatusEnum {

    PROCESSING("未处理", 0), PROCESSED("已处理", 1);

    private String name;

    private Integer status;

    LogStatusEnum(String name, Integer status) {
        this.name = name;
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public Integer getStatus() {
        return status;
    }

    public static String getNameByStatus(Integer status) {
        for (LogStatusEnum value : values()) {
            if(value.getStatus() == status) {
                return value.getName();
            }
        }
        return "";
    }
}
